package com.day0928.polymorphic;

import sun.dc.pr.PRError;

public class Penguin extends Pet {
    private String sex;

    public Penguin(String name, int health, int love, String sex) {
        super(name, health, love);
        this.sex = sex;
    }

    @Override
    public void show() {
        super.show();
        System.out.println("性别：" + this.sex);
    }
    @Override
    public void eat() {
        System.out.println("🐧吃🐟，喜爱度增加");
        super.love += 15;
    }

    @Override
    public void toHospotial() {
        System.out.println("🐧去医院，健康值增加");
        super.health += 10;
    }

    public void swimming(){
        System.out.println("🐧游泳");
    }
}
